<?php
	if (!empty($answer)) {
		echo "<div class='clear'></div>";
		echo "<ul class='TabControl'>";
		echo "<li>No $position</li>";
		echo "<li>";
		
		echo $this->Ajax->link(
									'Edit answer', 
		SITE_URL.'answers/edit/'.$answer['Answer']['id'],
		array('update'=>'AfterContentQuestion','indicator' => 'loading', 'type' => 'GET', 'escape' => false)
		);
		
		echo "</li>";
		echo "<li>";
		echo $this->Ajax->link(
									'Delete answer', 
		SITE_URL.'answers/delete/'.$answer['Answer']['id'],
		array('update'=>'MainContent','indicator' => 'loading', 'type' => 'GET', 'escape' => false),
		'Are you sure you want to delete this question?'
		);
		echo "</li>";
		if ($answer['Answer']['correct']) {
			echo "<li>";
			echo $this->Html->image('ok.png', array('height' => '20' , 'weight'=>'20'));
			echo "</li>";
		}
		echo "</ul>";
		echo $this->Html->div(
			'Content Answer', 
			$answer['Answer']['content'], 
			array('id' => $answer['Answer']['id']));
	} 
?>
<div id='AfterContentQuestion'></div>